<template>
	<view>
		<cu-custom bgColor="bg-gradual-blue" :isBack="true">
			<block slot="backText">返回</block>
			<block slot="content">试题详细信息</block>
		</cu-custom>
		<view class="cu-card case">
			<view class="cu-item ">
              <text class="text-brown">{{examlist.title}}</text>
			  <view v-if="examlist.type == 0">
			  <text class="text-red" >类型 ：单选 </text>
			  <view>
			  <text class="text-purple text-xl">A{{examlist.optiona}} </text>
			  </view>
			  <view>
			  <text class="text-purple text-xl">B{{examlist.optionb}} </text>
			  </view>
			  <view>
			  <text class="text-purple text-xl">C{{examlist.optionc}} </text>
			  </view>
			  <view>
			  <text class="text-purple text-xl">D{{examlist.optiond}} </text>
			  </view>
			  <view>
			  <text class="text-purple text-xl">答案:{{examlist.answer}} </text>
			  <view>
			  <text class="text-blue text-xl">解析:{{examlist.parse}} </text>
			  </view>
			  </view>
			  
			  </view>
			  <view v-if="examlist.type == 1">
			  <view>
			  <text class="text-pink" >类型 ：简答 </text>
			  </view>
			  <view>
			  <text class="text-purple text-xl">答案:{{examlist.answer}} </text>
			  </view>
			  <view>
			  <text class="text-blue text-xl">解析:{{examlist.parse}} </text>
			  </view>
			  </view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id:0,
				examlist:{},
				
			};
		},
		onLoad:function(option){
			this.id = option.id
			this.GetExamlistById()
		},
		methods:{
			GetExamlistById(){
				let that = this
				let data = {
					id:this.id
				}
				uni.request({
				url:"http://localhost/stuapi/StuGetExamlistById",
				data:data,
				method:"POST",
				header:{'content-type':'application/x-www-form-urlencoded'},
				success: (res) => {
				let code = res.data.code;
				console.log(res.data.data)
				if(code == 200){
					this.examlist = res.data.data
				}
				else{
				}
				uni.showToast({ title:res.data.message, icon:"none",})
				}
				});
			}
		}
	}
</script>

<style lang="less">

</style>
